Skip to content

Adopt httpware decoder paths in GitLabProvider#3

Merged
lesnik512 merged 5 commits into
mainfrom
feat/decoder-adoption
Jun 8, 2026
Merged

Adopt httpware decoder paths in GitLabProvider#3
lesnik512 merged 5 commits into
mainfrom
feat/decoder-adoption

Conversation

@lesnik512

@lesnik512 lesnik512 commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

Closes the loop on the httpware migration: switches GitLabProvider's three GET methods to use httpware 0.8.2's response_model= / send_with_response decoder paths and deletes the six in-tree validator helpers that existed only because the initial migration bypassed the decoder.

  • get_default_branchclient.get(url, response_model=_ProjectResponse)
  • get_latest_commit_on_default_branchclient.get(url, response_model=_CommitList) where _CommitList = RootModel[list[_CommitItem]]
  • list_tagsclient.send_with_response(req, response_model=_TagList) (needs the response back too for the Link header)
  • create_tag unchanged (POST, no body to decode)
  • _errors.translate_gitlab gains a DecodeError → ProviderAPIError branch in _translate_gitlab_transport
  • Floors httpware[pydantic]>=0.8.2 (requires DecodeError + send_with_response, both added upstream as part of this work)

Net: 6 validator helpers + 1 TypeVar deleted from gitlab.py, 2 RootModel wrappers added, 9 integration test assertions retargeted to the new translated wording.

Design spec: planning/specs/2026-06-08-httpware-decoder-adoption-design.md
Implementation plan: planning/plans/2026-06-08-httpware-decoder-adoption.md

Test plan

  • just lint-ci — clean (ruff format + ruff check + ty)
  • just test — 333 passed, 100% statement+branch coverage
  • mkdocs build --strict — clean
  • httpware seam smoke test — DecodeError and Client.send_with_response both importable from the resolved 0.8.2
  • End-to-end decoder path traced by final reviewer (malformed body → PydanticDecoder raises → DecodeErrorexcept httpware.ClientErrortranslate_gitlab_translate_gitlab_transportProviderAPIError("GitLab _ProjectResponse response could not be decoded: ..."))
  • CI matrix runs across Python 3.11–3.14

🤖 Generated with Claude Code

lesnik512 and others added 5 commits June 8, 2026 09:43
Follow-on to the 2026-06-07 migration: switch GitLabProvider's three
GETs onto httpware's response_model=/send_with_response decoder paths,
delete the six in-tree _validate_* helpers, extend translate_gitlab
with a DecodeError branch. Requires httpware>=0.8.2 (DecodeError + send_with_response).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Four-task plan derived from the 2026-06-08-httpware-decoder-adoption
design spec. Order: floor httpware>=0.8.2, TDD the DecodeError branch in
translate_gitlab, rewrite the 3 GETs onto decoder paths + update 9 test
assertions, final validation. Resolves all three spec open items inline
(RootModel availability, exact assertion count + line numbers, unused
imports).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-tree validators

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this Jun 8, 2026
@lesnik512 lesnik512 merged commit f18b529 into main Jun 8, 2026
8 of 10 checks passed
@lesnik512 lesnik512 deleted the feat/decoder-adoption branch June 8, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant